#ifndef COMMON_H
#define COMMON_H

#include <cstdio>
#include <cstdlib>
#include <iostream>
using namespace std;

typedef unsigned char byte;
typedef size_t ulint;

#ifndef NDEBUG
#define ASSERT(expr) \
    if( !(expr) ) { \
        cerr<<"#Assertion "<<#expr<<"Failed at line "<<__LINE__<<" in file "<<__FILE__<<endl; \
        abort(); \
    }
#define ASSERT_MSG(expr,msg) \
    if( !(expr) ) { \
        cerr<<"#Assertion "<<#expr<<"Failed at line "<<__LINE__<<" in file "<<__FILE__<<endl; \
        cerr<<"#Addition message: "<<msg<<endl; \
        abort(); \
    }
#else
#define ASSERT(expr)
#define ASSERT_MSG(expr,msg)
#endif



#endif // COMMON_H
